#include <list>
#include <vector>

using namespace std;

class Move {
 private:
  int x_;
  int y_;
  int number_;
  Move();

 public:
  Move(int x, int y, int number) : 
    x_(x),
    y_(y),
    number_(number)
  {} 
  int x() const { return x_; }
  int y() const { return y_; }
  int number() const { return number_; }
  void print() const;
};

class Puzzle {
  vector<vector<int> > sudoku_;
  int rank_;
  long tries_;

 public:
  Puzzle() : rank_(0), tries_(0) {};
  void CreateStructure(const vector<int> &mypuzzle);
  void ReadMovesFromFile();
  bool CheckMoveNumbers(const Move &move) const;
  bool SolvePuzzle();
  bool ChoosePosition(int *x, int *y) const;
  bool ChoosePositionNaive(int *x, int *y) const;
  void print() const;
};

